<?php
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

$pollTable = new BWWePollSheet('wePoll');

$pollView = $pollTable->getView();
?>
<table class="table table-hover">
    <thead>
        <tr>
            <th><input type="checkbox" name="checkAll_2" id="checkAll_2"></th>
            <th>投票名称</th>
            <th>活动描述</th>
            <th>操作</th>
        </tr> 
    </thead>
    <tbody>
        <?php foreach ($pollView as $pollId => $poll) { ?>
            <tr>
                <td><label class="checkbox">
                        <input type="checkbox" name="subBox[]" value="<?php echo $poll->id; ?>"> 
                    </label></td>
                <td> <?php echo $poll->getItem('name')->getValue(); ?> </td>              
                <td> <?php echo $poll->getItem('description')->getValue(); ?> </td>
                <td>
                    <div class="row-fluid">
                        <?php
                        echo $control->getAjaxLink(array('name' => '我要投票', 'id' => 'pollNow'), 
                                array(
                                    'cooker'=>'BWeEventWePoll\pollNow',
                                    'pollId' => $pollId));                       
                        ?>
                    </div>                   
                </td>
            </tr>
        <?php } ?>
    </tbody>
</table>
